<?php $this->load->view('common/head');?>
		<form class="form-horizontal margin-top-10" name="add" id="add" action="<?php echo $this->input->server('REQUEST_URI'); ?>" method="post">
		  <input type="hidden" name="id" id="id" value="<?=$projectData['id']?>">
		  <input type="hidden" name="procId" id="procId" value="<?=$projectData['id']?>">
			<table class="table table-condensed table-bordered mb27" style="width: 300px; margin:0 auto;">
			  <tbody>
			    <tr>
			      <td class="bg-primary col-md-3">订单目标</td>
			      <td><?=(float)$projectData['orderTarget']?></td>
			    </tr>
			    <tr>
			      <td class="bg-primary col-md-3">留资目标</td>
			      <td><?=(float)$projectData['capitalTarget']?></td>
			    </tr>
			    <tr>
			      <td class="bg-primary col-md-3">订单实际达成</td>
			      <td>
			      <input type="number" required min="0" class="form-control" name="orderActual" id="orderActual" value="<?=(float)$projectData['orderActual']?$projectData['orderActual']:''?>" placeholder="订单实际达成">
			      </td>
			    </tr>
			    <tr>
			      <td class="bg-primary col-md-3">留资实际达成</td>
			      <td>
			      <input type="number" required min="0" class="form-control" name="capitalActual" id="capitalActual" value="<?=(float)$projectData['capitalActual']?$projectData['capitalActual']:''?>" placeholder="留资实际达成">
			      </td>
			    </tr>
			    <tr>
			      <td class="bg-primary col-md-3">车展结算资料</td>
			      <td>
			      <span id="settleUploadDownload">
		            <?php if ($projectData['settleVoucher']) {?>
		            <a type="button" class="btn btn-default" href="<?=printUrl('Upload','download',array('fileId'=>$projectData['settleVoucher']['id']))?>" aria-label="Left Align" role="button">
		              <span class="glyphicon glyphicon-download-alt" aria-hidden="true"></span>
		              附件下载
		            </a>
		            <?php } ?>
		            </span>
		            <input type="hidden" id="settleUploadFileId" name="settleVoucher" value="<?=$projectData['settleVoucher']['id']?>" readonly="readonly">
		            <input type="button" id="settleUpload" value="上传" />
			      </td>
			    </tr>
			    <tr>
			      <td class="bg-primary col-md-3">申请结算费用</td>
			      <td>
			      <input type="number" required min="0" step="0.01" class="form-control" name="settleApply" id="settleApply" value="<?=(float)$projectData['settleApply']?$projectData['settleApply']:''?>" placeholder="结算申请费用">
			      </td>
			    </tr>
			    <tr>
			      <td colspan="2" align="center">
			    	<button type="submit" class="btn btn-default btn-primary">保存</button>
			  		<button type="button" onclick="closeWindow()" class="btn btn-default btn-primary">取消</button>
			      </td>
			    </tr>
			    </tbody>
			  </table>
		</form>
<script type="text/javascript" src="public/js/commonProject.js"></script>
<script type="text/javascript">
$(function(){
  initValidation();
});
//初始化验证
function initValidation(){
	$('form[name="add"]').find("input,select,textarea").jqBootstrapValidation("destroy");
	$('form[name="add"]').find("input,select,textarea").not("[type=submit]").jqBootstrapValidation({
	    preventSubmit:false,
	    submitSuccess: function (form, event) {
	         event.preventDefault();
	         ajaxFormSubmit('add');
	     },
	     submitError: function (form, event, errors) {
	       event.preventDefault();
	       }
  	});
}
</script>
<?php
  initUploadButtons(array('settleUpload'), printUrl('Upload','uploadSave',array('dir'=>'settleFile')), 'imgFile');
?>
<?php $this->load->view('common/foot');?>